﻿<!--
  Please keep these information:
  From: http://wpfhelpertools.codeplex.com/ 
  Author: http://www.cnblogs.com/xiaokang088 
  Email: xiaokang060@hotmail.com
  -->
<Window x:Class="PublishTool.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="main"
        Title="Publish files (Author:xiaokang060@hotmail.com)"  SizeToContent="WidthAndHeight" >
  <Window.Resources>
    <Storyboard x:Key="Storyboard1">
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon1" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#ddFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#ccFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#bbFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#aaFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#77FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#55FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#33FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#ffFFFFFF" />
      </ColorAnimationUsingKeyFrames>
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon2" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#ccFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#bbFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#aaFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#77FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#55FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#33FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#ffFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#ddFFFFFF" />
      </ColorAnimationUsingKeyFrames>
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon3" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#bbFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#aaFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#77FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#55FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#33FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#ffFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#ddFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#ccFFFFFF" />
      </ColorAnimationUsingKeyFrames>
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon4" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#aaFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#77FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#55FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#33FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#ffFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#ddFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#ccFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#bbFFFFFF" />
      </ColorAnimationUsingKeyFrames>
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon5" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#77FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#55FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#33FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#ffFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#ddFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#ccFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#bbFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#aaFFFFFF" />
      </ColorAnimationUsingKeyFrames>
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon6" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#55FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#33FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#ffFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#ddFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#ccFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#bbFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#aaFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#77FFFFFF" />
      </ColorAnimationUsingKeyFrames>
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon7" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#33FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#ffFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#ddFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#ccFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#bbFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#aaFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#77FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#55FFFFFF" />
      </ColorAnimationUsingKeyFrames>
      <ColorAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="icon8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
        <LinearColorKeyFrame KeyTime="00:00:0" Value="#ffFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.2" Value="#ddFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.4" Value="#ccFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.6" Value="#bbFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:0.8" Value="#aaFFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1" Value="#77FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.2" Value="#55FFFFFF" />
        <LinearColorKeyFrame KeyTime="00:00:1.4" Value="#33FFFFFF" />
      </ColorAnimationUsingKeyFrames>
    </Storyboard>
  </Window.Resources>
  <Window.Triggers>
    <EventTrigger  RoutedEvent="Window.Loaded" SourceName="main">
      <BeginStoryboard Storyboard="{StaticResource Storyboard1}"  Name="starAnimation"/>
    </EventTrigger>
    <EventTrigger  RoutedEvent="UserControl.Unloaded" SourceName="main">
      <StopStoryboard   BeginStoryboardName="starAnimation"/>
    </EventTrigger>
  </Window.Triggers>
  <Grid  Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />    
            <RowDefinition Height="50" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="33*" />
            <ColumnDefinition Width="33*" />
            <ColumnDefinition Width="33*" />
        </Grid.ColumnDefinitions>
    <TextBox Name="tb"
                 Grid.ColumnSpan="3"  
                 TextWrapping="Wrap" 
                 IsReadOnly="True"   
                 VerticalAlignment="Stretch" 
                 Margin="0,0,0,10" 
                 MinWidth="400" 
                Background="LightGoldenrodYellow"
                 MinHeight="200">
    </TextBox>
    <Button Content="Publish"
                Grid.Row="1"  
                Grid.Column="0" 
                Name="btnPublish" 
                Click="btnPublish_Click" 
                HorizontalAlignment="Stretch"  />
        <Button Content="Source" 
                Grid.Row="1"
                Grid.Column="1" 
                Name="btnSource"    
                HorizontalAlignment="Stretch" 
                Click="btnSource_Click" />
        <Button Content="Destination" 
                Grid.Row="1" 
                Grid.Column="2" 
                Name="btnDestination" 
                HorizontalAlignment="Stretch" 
                Click="btnDestination_Click" />

    <Border Background="#88000000"
            Margin="-10"
            Visibility="Collapsed"
            x:Name="mask"
            Grid.ColumnSpan="3" 
            Grid.RowSpan="2"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch" >
      <Viewbox Width="45"  Height="45">
        <Canvas Width="65" Height="65" x:Name="canvas" HorizontalAlignment="Center" VerticalAlignment="Center">
          <Ellipse   x:Name="icon1"  Canvas.Top="0" Canvas.Left="25" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
          <Ellipse    x:Name="icon2"  Canvas.Top="7.33" Canvas.Left="7.33" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
          <Ellipse    x:Name="icon3"  Canvas.Top="25" Canvas.Left="0" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
          <Ellipse    x:Name="icon4"  Canvas.Top="42.67" Canvas.Left="7.33" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
          <Ellipse    x:Name="icon5"  Canvas.Top="50" Canvas.Left="25" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
          <Ellipse    x:Name="icon6"  Canvas.Top="42.67" Canvas.Left="42.67" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
          <Ellipse    x:Name="icon7"  Canvas.Top="25" Canvas.Left="50" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
          <Ellipse   x:Name="icon8"   Canvas.Top="7.33" Canvas.Left="42.67" Width="15" Height="15" Fill="#ffFFFFFF">
          </Ellipse>
        </Canvas>
      </Viewbox>
    </Border>
  </Grid>
</Window>
